package emon.eline.manage.media.controller;

import emon.eline.manage.media.api.MediaFileControllerApi;
import emon.eline.manage.media.dto.QueryMediaFileRequest;
import emon.eline.manage.media.service.MediaFileService;
import emon.eline.model.QueryResponseResult;
import emon.eline.model.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/media/file")
public class MediaFileController implements MediaFileControllerApi {

    @Autowired
    private MediaFileService mediaFileService;
    @Override
    @GetMapping("/list/{page}/{size}")
    public QueryResponseResult findList(@PathVariable("page") int page,
                                        @PathVariable("size") int size,
                                        QueryMediaFileRequest queryMediaFileRequest) {

        return mediaFileService.findList(page,size,queryMediaFileRequest);
    }

    @Override
    public ResponseResult process(String id) {
        return null;
    }
}
